﻿using System;
using System.Collections.Generic;
using Acaweb.Data.Contracts;
using Acaweb.Model.Entities;
using Acaweb.Model.Entities.DatosCompuestos;
using Spring.Transaction.Interceptor;

namespace Acaweb.Data.Dao.NHibernate
{
    public class HistorialLaboralDao : HibernateDao<HistorialLaboral,HistorialLaboralPk>, IHistorialLaboralDao
    {
        public IList<HistorialLaboral> GetByAsociado(int CodigoInterno)
        {
            return this.Session.QueryOver<HistorialLaboral>().Where(t => t.HistorialLaboralPk.CodigoInterno == CodigoInterno).List();
        }

        public IList<HistorialLaboral> GetAll()
        {
            return GetAll<HistorialLaboral>();
        }


        public void Delete(HistorialLaboralPk obj)
        {
            HistorialLaboral Historial = this.GetById(obj);

            this.Delete(Historial);
        }
    }
}
